package com.bnz.entity;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Data // 添加get，set，toString方法
@ConfigurationProperties(prefix = "book") // / 从配置文件拿到前缀为book的数据
//@Component  // 在配置类加了@Configuration，@EnableConfigurationProperties({Book.class})可以不写
public class Book {

    private Integer id;
    private String name;
    private String author;

}
